package com.hp.erp.controller;

import com.hp.erp.entity.JsonResult;
import com.hp.erp.service.IRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class RoleController {

    @Autowired
    private IRoleService roleService;

    @RequestMapping("/roles")
    public JsonResult getAllRoles(){
        return new JsonResult(1,roleService.list());
    }
}
